<?
  require_once '../classes/LoadProperties.php';
  require_once '../classes/ConnectionDB.php';
  require_once '../classes/DisciplinaDataManager.php';

//
//echo 'username= '.$username;
//echo 'password = '.$password;
  $connection = ConnectionDB::getInstance()->connectToDB();

  $properties = new LoadProperties();

  $properties->initServices();
?>
<html>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <head>
      <title>Dock and Stack Examples</title>
      <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8">
      <link rel="stylesheet" type="text/css" media="screen" href="../css/all-examples.css">
    <noscript>
      <style type="text/css">
        #dock { top: 0; left: 100px; }
        a.dock-item { position: relative; float: left; margin-right: 10px; }
        .dock-item span { display: block; }
        .stack { top: 0; }
        .stack ul li { position: relative; }
      </style>
    </noscript>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    <script type="text/javascript" src="../js/fisheye-iutil.min.js"></script>
    <script type="text/javascript" src="../js/dock-example1.js"></script>
    <script type="text/javascript" src="../js/jquery.jqDock.min.js"></script>

    <script type="text/javascript">
      var $j = jQuery.noConflict();
      $j(function(){
        var jqDockOpts = {align: 'left', duration: 200, labels: 'tc', size: 48, distance: 85};
        $j('#jqDock').jqDock(jqDockOpts);
      });
    </script>
</head>
<body>
    
    <?php
      if ($_COOKIE['username'] == "")
      {
    ?>
        <script>location.href="<?= $properties->getPath(); ?>/portal/sessionExpired.html";</script><?php
      }
      else
      {
        if (DisciplinaDataManager::getInstance()->getDisciplineUtente($connection) == null)
          echo "<script>location.href='../utente/utente.php?disc=1&codiceUtente=" . $_COOKIE['codiceUtente'] . "';</script>";

        else
        {
    ?>
          <div id="dock">
            <div class="dock-container">
              <a class="dock-item" href="javascript:history.go(-1)"><span>&nbsp;</span><img src="../images/icons/back.ico" alt="Indietro" title="Indietro"/></a>
              <a class="dock-item" href='<?= $properties->getPath() ?>/utente/utente.php?codiceUtente=<?= $_COOKIE['codiceUtente'] ?>'><span>&nbsp;</span><img src="../images/icons/PNG/Administrator.png" title="<?= $_COOKIE['username'] ?>"/></a>
              <a class="dock-item" href='<?= $properties->getPath() ?>/portal/newMenu.php'><span>&nbsp;</span><img src="../images/icons/64/home.png" title="Home" /></a>
              <a class="dock-item" href='<?= $properties->getPath() ?>/utente/nuovaClasse.php'><span>&nbsp;</span><img src="../images/icons/128/school.png" title="Nuova classe" /></a>
              <a class="dock-item" href='<?= $properties->getPath() ?>/report/searchStudents.php'><span>&nbsp;</span><img src="../images/icons/128/people.png" title="Cerca Studenti" /></a>
              <a class="dock-item" href='<?= $properties->getPath() ?>/testManaging/newArgomento.php?codiceUtente=<?= $_COOKIE['codiceUtente'] ?>'><span>&nbsp;</span><img title="Nuovo Argomento" src="../images/icons/128/phonebook.png" /></a>
              <a class="dock-item" href='<?= $properties->getPath() ?>/testManaging/newQuestion.php'><span>&nbsp;</span><img title="Nuova domanda" src="../images/icons/128/plus.png" /></a>
              <a class="dock-item" href='<?= $properties->getPath() ?>/report/reportQuestions.php'><span>&nbsp;</span><img title="Cerca domande" src="../images/icons/PNG/Document.png" /></a>
              <a class="dock-item" href='<?= $properties->getPath() ?>/testManaging/newTest_1.php'><span>&nbsp;</span><img title="Nuovo test" src="../images/icons/128/interact.png" /></a>
              <a class="dock-item" href='<?= $properties->getPath() ?>/report/searchTest.php'><span>&nbsp;</span><img title="Cerca test" src="../images/icons/128/pencil.png" /></a>
              <a class="dock-item" href='<?= $properties->getPath() ?>/testManaging/reportLiveTest.php'><span>&nbsp;</span><img title='Test sottomessi' src="../images/icons/128/vault.png" /></a>
              <a class="dock-item" href='<?= $properties->getPath() ?>/testManaging/reportPdfLiveTest.php'><span>&nbsp;</span><img title='Verifica test'  src="../images/icons/128/world.png" /></a>
              <a class="dock-item" href='<?= $properties->getPath() ?>/portal/logout.php'><span>&nbsp;</span><img title="Logout" src="../images/icons/PNG/logout.png" /></a>

            </div><!-- end div .dock-container -->
          </div><!-- end div .dock #dock -->

    <? }
      } ?>
  
</body>
</html>